Skip to content

Conversation

@brendt
Copy link
Member

@brendt brendt commented Aug 16, 2025

  • The PrimaryKey is now again included in IsDatabaseModel
  • Added support for bindable values via attributes
  • Update docs

Closes #1482
Closes #1519

@innocenzi
Copy link
Member

innocenzi commented Aug 17, 2025

What do we think about bindingValue being an attribute? I think it feels bad to have a property for this purpose, kind of like we have a #[Table] to avoid having a property

We can also make PrimaryKey the fallback bindable value if the attribute is not provided. It's a bit specialized in the framework code but it would feel better when consuming in userland (and we already have an exception for BackedEnum anyway)

@brendt
Copy link
Member Author

brendt commented Aug 18, 2025

What do we think about bindingValue being an attribute? I think it feels bad to have a property for this purpose, kind of like we have a #[Table] to avoid having a property

We can also make PrimaryKey the fallback bindable value if the attribute is not provided. It's a bit specialized in the framework code but it would feel better when consuming in userland (and we already have an exception for BackedEnum anyway)

You, sir, are a genius. First I'll have to clean up this PR some more though, because I broke a lot of things

@brendt brendt changed the title feat(http)!: support bindable values in uri generation feat(database): primary key improvements Aug 18, 2025
@brendt brendt merged commit b33204f into 2.x Aug 18, 2025
78 checks passed
@brendt brendt deleted the bindable-updates branch August 18, 2025 07:42
Bapawe pushed a commit to Bapawe/tempest-framework that referenced this pull request Aug 29, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add id and bindableValue to IsDatabaseModel Convert Id (or PrimaryKey) to textual variant when passed into uri, as well as object with PrimaryKey

3 participants